Yet more rename fixes.
# This file expects the variable 'vmid' to be set.
#============================================================================
-import sys
-import xenctl.ip
-
try:
vmid = int(vmid) # convert to integer
except:
from twisted.internet import defer
import xen.ext.xc; xc = xen.ext.xc.new()
-import xenctl.ip
import sxp
import XendRoot
if not dominfo: return None
return dominfo.get_device_by_index(vif)
- def domain_vif_ip_add(self, dom, vif, ip):
- dom = int(dom)
- return xenctl.ip.setup_vfr_rules_for_vif(dom, vif, ip)
+## def domain_vif_ip_add(self, dom, vif, ip):
+## dom = int(dom)
+## return xenctl.ip.setup_vfr_rules_for_vif(dom, vif, ip)
def domain_vbd_ls(self, dom):
dominfo = self.domain_get(dom)
from twisted.internet import defer
import xen.ext.xc; xc = xen.ext.xc.new()
-import xenctl.ip
+import xen.util.ip
import sxp
print >> open(IP_NONLOCAL_BIND, 'w'), str(v)
def link_local(ip):
- return xenctl.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0')
+ return xen.util.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0')
def arping(ip, gw):
cmd = '/usr/sbin/arping -A -b -I eth0 -c 1 -s %s %s' % (ip, gw)
print cmd
os.system(cmd)
- gateway = xenctl.ip.get_current_ipgw() or '255.255.255.255'
+ gateway = xen.util.ip.get_current_ipgw() or '255.255.255.255'
nlb = get_ip_nonlocal_bind()
if not nlb: set_ip_nonlocal_bind(1)
try:
cmd = '\n'.join(["import sys",
"import os",
"import os.path",
+ "import xen.util.ip",
"xm_file = '%s'" % defaults,
"xm_help = %d" % help ])
exec cmd in globals, locals
import time
from xen.xend.XendClient import server
-from xen.xend.xm.opts import *
+from xen.xm.opts import *
gopts = Opts(use="""[options] [DOM]